<%@page import="bean.News"%>
<%@ page import="bean.Admin" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>修改用户</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../css/layui.css" media="all">
</head>

<body>

<fieldset class="layui-elem-field layui-field-title"
          style="margin-top: 20px;">
    <legend>修改用户</legend>
</fieldset>
<%
    Admin admin = (Admin) session.getAttribute("nowUsers");
    int currentPage = (int) (session.getAttribute("currentPage"));
%>
<form action="/News/Update?id=<%=admin.getId()%>"
      method="post" name="publish" enctype="multipart/form-data">

    <div class="layui-form-item">
        <label class="layui-form-label">账户</label>
        <div class="layui-input-block">
            <input type="text" name="AdminAccont"
                   value="<%=admin.getAccount()%>"
                   lay-verify="title"
                   autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-block">
            <input type="text" name="AdminPassword" lay-verify="title"
                   autocomplete="off"
                   value="<%=admin.getPwd()%>"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">名字</label>
        <div class="layui-input-block">
            <input type="text" name="AdminName" lay-verify="title"
                   value="<%=admin.getName()%>"
                   autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block">
            <select name="AdminSex"  value="<%=admin.getSex()%>">
                <option value="男">男</option>
                <option value="女">女</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">权限</label>
        <div class="layui-input-block">
            <select name="AdminSex"  value="<%=admin.getAdmin()%>">
                <option value="<%=true%>">超级管理员</option>
                <option value="<%=false%>">普通发布者</option>
            </select>
        </div>
    </div>



    <div class="layui-btn-container">
        <div class="layui-input-block">
            <input type="submit" class="layui-btn layui-btn-radius"
                   value="完成编辑"> <input type="reset"
                                            class="layui-btn layui-btn-radius" value="撤销修改"></input> <a
                href="usersList.jsp?currentPage=<%=currentPage%>"><input
                type="button" class="layui-btn layui-btn-radius" value="返回"></input></a>
        </div>
    </div>

</form>


</body>

</html>